package com.binguo.common.util;

import java.io.File;
import java.io.IOException;

public class ShellUtil {

    public static boolean doShell(String user,String password,String ip){
        ProcessBuilder pb = new ProcessBuilder("./" + "rdesktop", user,
                password, ip);
        pb.directory(new File("/data/rdesktop"));
        int runningStatus = 0;
        String s = null;
        try {
            Process p = pb.start();
            try {
                runningStatus = p.waitFor();
                return true;
            } catch (InterruptedException e) {
            }

        } catch (IOException e) {
        }
        if (runningStatus != 0) {
        }
        return false ;
    }


}
